<?php
/**
 * Created by PhpStorm.
 * User: chenx
 * Date: 18-3-13
 * Time: 下午6:31
 */

namespace common\models;


use yii\db\ActiveRecord;

class Withdraw extends ActiveRecord
{
    public static function tableName()
    {
        return 'withdraw';
    }

    public function rules()
    {
        return [
          [['shop_name','shop_phone','withdraw_no','withdraw_serial','bank_name','bank_code','user_name','dismissal','openid','bank_no',],'string'],
          [['withdraw_money','shop_service_money','after_money','service_money','before_money','service_rate'],'double'],
          [['shop_id','id','withdraw_status','type','create_time','examine_time','complete_time'],'integer'],
        ];
    }

    public function attributeLabels()
    {
        return [
            'shop_id	'=>'店铺id',
            'shop_name'=>'店铺名称',
            'shop_phone'=>'店铺联系电话',
            'withdraw_no'=>'订单号',
            'withdraw_serial'=>'流水号',
            'withdraw_money'=>'提现金额',
            'bank_name'=>'开户行名称',
            'bank_code'=>'开户行对应编号',
            'bank_no'=>'银行卡号',
            'user_name'=>'卡号对应用户名称',
            'before_money'=>'提现钱余额',
            'after_money'=>'提现之后剩余余额',
            'service_money'=>'手续费',
            'shop_service_money'=>'平台交易服务费',
            'service_rate'=>'平台服务费',
            'withdraw_status'=>'申请状态 0 待审核 1未通过 2提现中 3已完成 4提现失败',
            'dismissal'=>'拒绝原因',
            'type'=>'0 微信提现 1银行卡提现',
            'openid'=>'openid',
            'create_time'=>'提现申请时间',
            'examine_time'=>'审核时间',
            'complete_time'=>'完成时间',
        ];
    }
}